<template>
  <div>
    <!-- 标准版页面 -->
    <div v-if="(getVersionType() == 1 || getVersionType() == 2)">
      <div v-if="getEnterpriseInfo().supplierFlag == 1" class="align-c">
        <div class="v-align-c">
          <img v-if="getEnterpriseConfig().supplierIndexPicUrl" :src="getEnterpriseConfig().supplierIndexPicUrl" />
          <img v-else src="https://veekrayimg.joinsun.vip/supplier.png" />
        </div>
      </div>
      <div v-else-if="getEnterpriseInfo().memberFlag == 1" class="align-c">
        <div class="v-align-c">
          <img v-if="getEnterpriseConfig().memberIndexPicUrl" :src="getEnterpriseConfig().memberIndexPicUrl">
          <img v-else src="https://veekrayimg.joinsun.vip/member-dashboard.png">
        </div>
      </div>
      <div v-else>
        <standard-statistics />
      </div>
    </div>
    <!-- 社群版页面 -->
    <div v-if="getVersionType() == 4">
      <div v-if="getEnterpriseInfo().supplierFlag == 1" class="align-c">
        <div class="v-align-c">
          <img v-if="getEnterpriseConfig().supplierIndexPicUrl" :src="getEnterpriseConfig().supplierIndexPicUrl" />
          <img v-else src="https://veekrayimg.joinsun.vip/supplier.png" />
        </div>
      </div>
      <div v-else-if="getEnterpriseInfo().warehouseFlag == 1" class="align-c">
        <div class="v-align-c">
          <img v-if="getEnterpriseConfig().warehouseIndexPicUrl" :src="getEnterpriseConfig().warehouseIndexPicUrl">
          <img v-else src="https://enterpriseimg.joinsun.vip/upload/warehouse-system.png">
        </div>
      </div>
      <div v-else-if="getEnterpriseInfo().memberFlag == 1" class="align-c">
        <div class="v-align-c">
          <img v-if="getEnterpriseConfig().memberIndexPicUrl" :src="getEnterpriseConfig().memberIndexPicUrl">
          <img v-else src="https://veekrayimg.joinsun.vip/member-dashboard.png">
        </div>
      </div>
      <div v-else>
        <group-statistics />
      </div>
    </div>
  </div>
</template>

<script>
  import StandardStatistics from './standard'
  import GroupStatistics from '../goods/statistics'

  export default {
    name: 'dashboard-index',
    components: {
      StandardStatistics,
      GroupStatistics
    },
    data() {
      return {
      }
    },
    // 初始化页面
    created() {
      this.init()
    },
    methods: {
      init() {
      }
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
</style>
